package com.yanqu.road.server.cmd.wingroom;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.wingroom.WingRoomProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = Protocol.C_WING_ROOM_CROSS_PULL_PLAYER_PATRONS_PLAYER_RESP, desc = "跨服去拉取他玩家top5门客返回")
public class WingRoomCrossPullPlayerPatronsRespCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        WingRoomProto.CrossPullPlayerPatronsRespMsg respMsg = WingRoomProto.CrossPullPlayerPatronsRespMsg.parseFrom(packet.getBytes());

        MessageHelper.sendPacket(respMsg.getOriginPlayerServerId(), respMsg.getOriginPlayerUserId(),
                YanQuMessageUtils.buildMessage(Protocol.S_WING_ROOM_CROSS_PULL_PATRONS_RESP_FROM_CROSS, respMsg.toBuilder()));

    }

    @Override
    public void sendData() {

    }
}
